<div class="accounter vm">
	<h1><span></span>管理员信息编辑</h1>

	<div class="con">
		<dl class="user clearfix">
			<dt>
				<!-- 头像 -->
				<img src="{{picSrc}}" alt="个人头像">
				<p>
					<a href="javascript:void(null)" ng-click="picShow(true)">修改头像</a>
				</p>
				<span></span>
			</dt>
			<dd>
				<!-- 信息修改表单 -->
				<form class="adduser clearfix" name='userform' novalidate>
					<!-- 第二个模块 -->
					<div class="side">
						<label>昵称:&nbsp;
							<input type="text" name="name" ng-model="name" required ng-disabled="changeform" ng-focus="nameblur(false)" ng-blur="nameblur(true)">
						</label>
						<div class="errorBox">
						    <span ng-show="nameblur1 && userform.name.$dirty">
						    	<span ng-show="userform.name.$error.required">请输入用户昵称</span>
						    </span>
				   		</div>

						<label>部门:&nbsp;
							<select name="" id="" ng-model="parts" ng-disabled="changeform">
								<option value="IT部">IT部</option>
								<option value="直营部">直营部</option>
							</select>
						</label>
						<div class="errorBox"></div>

						<label>职位:&nbsp;
							<input type="text" name="work" ng-model="work" required ng-disabled="changeform" ng-focus="workblur(false)" ng-blur="workblur(true)">
						</label>
						<div class="errorBox">
						    <span ng-show="workblur1 && userform.work.$dirty">
						    	<span ng-show="userform.work.$error.required">请输入职位</span>
						    </span>
				   		</div>

					</div>

					<!-- 第二个模块 -->
					<div class="side">
						<label>登录邮箱:&nbsp;
							<input type="text" ng-model="email" required disabled="disabled">
						</label>
						<div class="errorBox"></div>

						<label>角色:&nbsp;
							<input type="text" ng-model="power" required disabled="disabled">
						</label>
						<div class="errorBox"></div>

					</div>
					<div class="side">
						<button ng-click="write()" ng-show="changeform">编辑</button>
						<button ng-click="save()" ng-show="!changeform" ng-disabled="userform.$invalid">保存</button>
						<button ng-click="exit()" ng-show="!changeform">取消</button>
					</div>
				</form>
			</dd>
		</dl>

		<!-- 修改密码 -->
		<h2>修改登录密码</h2>
		<div class="h2">
			<p>提示：密码字符不能少于6个字符，不能纯数字和有特殊符号。</p>
			<form class="change_pw clearfix" name='changform' novalidate>
				<div class="password">
					<label>原密码：
						<input type="text" name="old" ng-model="old" ng-pattern="/^[a-zA-Z][a-zA-Z0-9]{5,11}/"required>
					</label>
					<div class="errorBox">
						<span ng-show="changform.old.$dirty">
							<span  ng-show="changform.old.$invalid && !changform.old.$error.required">密码格式错误</span>
							<span ng-show="changform.old.$error.required">请输入原密码</span>
						</span>
					</div>
				</div>

				<div class="password">
					<label>新密码：
						<input type="text" name="new" ng-model="new" ng-pattern="/^[a-zA-Z][a-zA-Z0-9]{5,11}/" required>
					</label>
					<div class="errorBox">
						<span ng-show="changform.new.$dirty">
							<span  ng-show="changform.new.$invalid && !changform.new.$error.required">密码格式错误</span>
							<span ng-show="changform.new.$error.required">请输入新密码</span>
						</span>
					</div>
				</div>

				<button class="fr">保存</button>
			</form >
		</div>
		
		<!-- 选取头像框 -->
		<div class="fixed_box" ng-show="picFormShow">
			<form class="picform" name='picform' novalidate>
				<h3>修改头像</h3>
				<em ng-click="picShow(false)">✖</em>

				<div class="fcon">
					<div class="taptit">
						<span ng-click="tapconShow($event,false)">本地上传</span>
						<span class="unshow" ng-click="tapconShow($event,true)">推荐头像</span>
					</div>

					<div class="tapcon">
						<div class="tapcon1" ng-show="!tapconshow">
							<p>从电脑里挑选一张图片作为头像</p>
							<div class="inputbox">
								<input type="text" name="filepath" id="filepath" disabled="disabled" required>
								<label for="filepic">
									上传
									<input type="file" id="filepic" onchange="getPath(this)">
								</label>
							</div>
							<p>支持jpg/gif/png格式文件，文件需小于2M</p>
						</div>

						<div class="tapcon2" ng-show="tapconshow">
							<p>&nbsp;&nbsp;&nbsp;从下列头像中选择你喜欢的头像</p>
							<div class="checkImg clearfix">
								<div class="imgbox fl" ng-click="checkImg($event)">
									<img src="{{urlAddress}}/images/us_pic1.jpg">
									<img src="{{urlAddress}}/images/us_pic2.jpg">
									<img src="{{urlAddress}}/images/us_pic3.jpg">
									<img src="{{urlAddress}}/images/us_pic1.jpg">
									<img src="{{urlAddress}}/images/us_pic2.jpg">
									<img src="{{urlAddress}}/images/us_pic3.jpg">
									<img src="{{urlAddress}}/images/us_pic1.jpg">
									<img src="{{urlAddress}}/images/us_pic2.jpg">
									<img src="{{urlAddress}}/images/us_pic3.jpg">
								</div>

								<dl class="fr">
									<dd>
										<img src="{{picSrc}}" id="showPic">
									</dd>
									<dt>预览头像</dt>
								</dl>
							</div>
						</div>
					</div>

				</div>

		   		<div class="fm_ft">
		   			<button ng-click="picShow(false)">取消</button>
		   			<button ng-disabled="picform.$invalid">保存</button>
		   		</div>
			</form>
		</div>
	</div>
</div>